/*
 * FILE route_tb.h
 * DESC route table defines
 */

#ifndef __ROUTE_TB_H__
#define __ROUTE_TB_H__

#define RT_TYPE_IP4     4
#define RT_TYPE_IP6     6

#include "config.h"
#include "ip.h"  /* for IP_ADDR*/
#include "mac.h" /* for MAC_ADDR*/

typedef struct _route4 {
    /* As a IPv4 address, the
     * IP_ADDR type include all
     * the feature of the address.
     * means the ip_p4 member act
     * as the IPv4 address, the IP_p3
     * member act as sub-net mask, and
     * the ip_p2 member act as default
     * gateway. Beside, the ip_p1 member
     * alaway is 0*/
    IP_ADDR ip;
    MAC_ADDR mac;  
}ROUTE4;

typedef struct _route6 {
    /* As a IPv6 address, the
     * IP_ADDR type just include
     * one 128-bit address*/
    IP_ADDR ip;
    IP_ADDR def_route;
    MAC_ADDR mac;
}ROUTE6;


#define RT_IDX_DEFGW    0
#define RT_IDX_THIS     1

#endif /* __ROUTE_TB_H__*/
